package com.jin.spirng_boot_learn.ioc;

import com.jin.spirng_boot_learn.ioc.beans.Car;
import com.jin.spirng_boot_learn.ioc.beans.ShipFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.jin.spirng_boot_learn.ioc")
public class Appconfig {

    @Bean(initMethod = "carInitMethod", destroyMethod = "carDestroyMethod")
    public Car car() {
        return new Car();
    }

    @Bean
    public ShipFactoryBean shipFactoryBean(){
        return new ShipFactoryBean();
    }

}
